package com.fc.campusapplicationsystem.service;

import com.fc.campusapplicationsystem.mapper.CommentMapper;
import com.fc.campusapplicationsystem.model.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 贺哲
 * @2020-02-29 15:14
 */
@Service
public class CommentServiceImpl implements CommentService {
    @Autowired
    CommentMapper commentMapper;

    @Override
    public List<Comment> list() {
        return commentMapper.selectAll();
    }

    @Override
    public Integer add(Comment comment) {
        return commentMapper.insertSelective(comment);
    }

    @Override
    public List<Comment> getCommentByReListId(Integer reId) {
        return commentMapper.getCommentByReListId(reId);
    }
}
